<template>
  {{ name }}
  <div class="c">hi，这是vue3渲染，时间：{{ time }}</div>
  <Zoop />
  <Yro />
</template>

<script lang="ts" setup>
import Dayjs from "dayjs";
import { onUnmounted, ref } from "vue";
import Zoop from "./Zoop.vue";
import Yro from "./Yro.vue";
const time = ref("");
const name: string = "测试ts校验";
const timerhander = setInterval(() => {
  time.value = Dayjs().format("YYYY-MM-DD HH:mm:ss");
}, 1000);
onUnmounted(() => {
  clearInterval(timerhander);
});
/**测试babel转箭头函数为普通函数 */
const fff = () => {
  console.log(11);
};
console.log(fff);
</script>

<style scoped lang="scss">
.c {
  font-size: 20px;
  font-weight: bold;
  border: 1px solid black;
  padding: 20px;
  color: green;
}
</style>
